using ns0;
using ns4;
using System;
using System.Text;
namespace ns9
{
	public sealed class EAN8Reader : UPCEANReader
	{
		private int[] int_8;
		internal override BarcodeFormat BarcodeFormat
		{
			get
			{
				return BarcodeFormat.EAN_8;
			}
		}
		public EAN8Reader()
		{
			this.int_8 = new int[4];
		}
		protected internal override int decodeMiddle(BitArray bitArray_0, int[] startRange, StringBuilder result)
		{
			int[] array = this.int_8;
			array[0] = 0;
			array[1] = 0;
			array[2] = 0;
			array[3] = 0;
			int size = bitArray_0.Size;
			int num = startRange[1];
			int num2 = 0;
			while (num2 < 4 && num < size)
			{
				int num3 = UPCEANReader.smethod_5(bitArray_0, array, num, UPCEANReader.int_6);
				result.Append((char)(48 + num3));
				for (int i = 0; i < array.Length; i++)
				{
					num += array[i];
				}
				num2++;
			}
			int[] array2 = UPCEANReader.smethod_4(bitArray_0, num, true, UPCEANReader.int_5);
			num = array2[1];
			num2 = 0;
			while (num2 < 4 && num < size)
			{
				int num3 = UPCEANReader.smethod_5(bitArray_0, array, num, UPCEANReader.int_6);
				result.Append((char)(48 + num3));
				for (int i = 0; i < array.Length; i++)
				{
					num += array[i];
				}
				num2++;
			}
			return num;
		}
	}
}
